<template>
  <div class="list">
    <to-search></to-search>
    <!-- 展示数据 -->
    <list-vue :goods="goods"></list-vue>
  </div>
</template>

<script>
import { reqCateList } from "../../http/api"
export default {
  data() {
    return {
      goods: [],
    }
  },
  mounted() {
    reqCateList({
      cateid: this.$route.query.id,
      type: this.$route.query.type,
    }).then((res) => {
      console.log(res);
      this.goods = res.data.list.goodData?res.data.list.goodData:[]
    })
  }
}
</script>

<style scoped lang="less">
@import url(../../less/index.less);
.list {
  margin-top: 1rem;
}
</style>